<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('所属行业')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control" name="row[industry_code]" data-rule="required">
                <option value="">请选择行业</option>
                {volist name="industryList" id="industry"}
                <option value="{$industry.industry_code}" {if $row.industry_code == $industry.industry_code}selected{/if}>{$industry.industry_name}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('所属模块')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control" name="row[module_name]" data-rule="required">
                <option value="">请选择模块</option>
                <option value="order" {if $row.module_name == 'order'}selected{/if}>订单</option>
                <option value="product" {if $row.module_name == 'product'}selected{/if}>产品</option>
                <option value="process" {if $row.module_name == 'process'}selected{/if}>工序</option>
                <option value="resource" {if $row.module_name == 'resource'}selected{/if}>资源</option>
                <option value="equipment" {if $row.module_name == 'equipment'}selected{/if}>设备</option>
                <option value="employee" {if $row.module_name == 'employee'}selected{/if}>员工</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('字段名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" name="row[field_name]" value="{$row.field_name}" data-rule="required" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('字段标签')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" name="row[field_label]" value="{$row.field_label}" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('字段类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control" name="row[field_type]" data-rule="required" id="field_type">
                <option value="text" {if $row.field_type == 'text'}selected{/if}>文本</option>
                <option value="number" {if $row.field_type == 'number'}selected{/if}>数字</option>
                <option value="date" {if $row.field_type == 'date'}selected{/if}>日期</option>
                <option value="datetime" {if $row.field_type == 'datetime'}selected{/if}>日期时间</option>
                <option value="select" {if $row.field_type == 'select'}selected{/if}>下拉选择</option>
                <option value="textarea" {if $row.field_type == 'textarea'}selected{/if}>多行文本</option>
                <option value="checkbox" {if $row.field_type == 'checkbox'}selected{/if}>复选框</option>
                <option value="radio" {if $row.field_type == 'radio'}selected{/if}>单选框</option>
            </select>
        </div>
    </div>
    <div class="form-group" id="options_group" style="{if $row.field_type == 'select' || $row.field_type == 'checkbox' || $row.field_type == 'radio'}display:block;{else}display:none;{/if}">
        <label class="control-label col-xs-12 col-sm-2">{:__('选项配置')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea class="form-control" name="row[field_options]" rows="3">{$row.field_options|raw}</textarea>
            <span class="help-block">JSON格式，如: ["真皮","仿皮","布艺","绒布"]</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('默认值')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" name="row[default_value]" value="{$row.default_value}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否必填')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="radio" name="row[is_required]" value="1" {if $row.is_required == 1}checked{/if}> 是
            <input type="radio" name="row[is_required]" value="0" {if $row.is_required == 0}checked{/if}> 否
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否可搜索')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="radio" name="row[is_searchable]" value="1" {if $row.is_searchable == 1}checked{/if}> 是
            <input type="radio" name="row[is_searchable]" value="0" {if $row.is_searchable == 0}checked{/if}> 否
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否显示')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="radio" name="row[is_visible]" value="1" {if $row.is_visible == 1}checked{/if}> 是
            <input type="radio" name="row[is_visible]" value="0" {if $row.is_visible == 0}checked{/if}> 否
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('排序')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" class="form-control" name="row[sort]" value="{$row.sort}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control" name="row[status]">
                <option value="normal" {if $row.status == 'normal'}selected{/if}>正常</option>
                <option value="hidden" {if $row.status == 'hidden'}selected{/if}>隐藏</option>
            </select>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>


